import { createRouter, createWebHistory } from 'vue-router'
import Dashboard from '../views/Dashboard.vue'
import Users from '../views/Users.vue'
import Settings from '../views/Settings.vue'
// 新增导入
import UserManagement from '../views/UserManagement.vue'
import Menu from '../views/Menu.vue'
import Role from '../views/Role.vue'
import Sub1 from '../views/Sub1.vue'
import Sub2 from '../views/Sub2.vue'
// 地图功能页面
import Gis from '../views/Gis.vue'
// 低代码设计器
import LowCodeDesigner from '../views/LowCodeDesigner.vue'
import BigScreenDesigner from '../views/BigScreenDesigner.vue'
import TourismProducts from '../views/TourismProducts.vue'

const routes = [
  {
    path: '/',
    redirect: '/dashboard'
  },
  {
    path: '/dashboard',
    name: 'Dashboard',
    component: Dashboard
  },
  {
    path: '/users',
    name: 'Users',
    component: Users
  },
  {
    path: '/settings',
    name: 'Settings',
    component: Settings
  },
  // 新增路由
  {
    path: '/user-management',
    name: 'UserManagement',
    component: UserManagement
  },
  {
    path: '/menu',
    name: 'Menu',
    component: Menu
  },
  {
    path: '/role',
    name: 'Role',
    component: Role
  },
  {
    path: '/sub1',
    name: 'Sub1',
    component: Sub1
  },
  {
    path: '/sub2',
    name: 'Sub2',
    component: Sub2
  },
  // 地图功能路由
  {
    path: '/gis',
    name: 'Gis',
    component: Gis
  },
  // 低代码设计器路由
  {
    path: '/low-code',
    name: 'LowCodeDesigner',
    component: LowCodeDesigner
  },
  // 大屏设计器路由
  {
    path: '/big-screen',
    name: 'BigScreenDesigner',
    component: BigScreenDesigner
  },
  // 旅游商品管理路由
  {
    path: '/tourism-products',
    name: 'TourismProducts',
    component: TourismProducts
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router